Question: One line is described by
\[\begin{pmatrix} 2 \\ 3 \\ 4 \end{pmatrix} + t \begin{pmatrix} 1 \\ 1 \\ -k \end{pmatrix}.\]Another line is described by
\[\begin{pmatrix} 1 \\ 4 \\ 5 \end{pmatrix} + u \begin{pmatrix} k \\ 2 \\ 1 \end{pmatrix}.\]If the lines are coplanar (i.e. there is a plane that contains both lines), then find all possible values of $k.$
Solution: The direction vectors of the lines are $\begin{pmatrix} 1 \\ 1 \\ -k \end{pmatrix}$ and $\begin{pmatrix} k \\ 2 \\ 1 \end{pmatrix}.$  Suppose these vectors are proportional.  Then comparing $y$-coordinates, we can get the second vector by multiplying the first vector by 2.  But then $2 = k$ and $-2k = 1,$ which is not possible.

So the vectors cannot be proportional, which means that the lines cannot be parallel.  Therefore, the only way that the lines can be coplanar is if they intersect.

Equating the representations for both lines, and comparing entries, we get
\begin{align*}
2 + t &= 1 + ku, \\
3 + t &= 4 + 2u, \\
4 - kt &= 5 + u.
\end{align*}Then $t = 2u + 1.$  Substituting into the first equation, we get $2u + 3 = 1 + ku,$ so $ku = 2u + 2.$

Substituting into the second equation, we get $4 - k(2u + 1) = 5 + u,$ so $2ku = -k - u - 1.$  Hence, $4u + 4 = -k - u - 1,$ so $k = -5u - 5.$  Then
\[(-5u - 5)u = 2u + 2,\]which simplifies to $5u^2 + 7u + 2 = 0.$  This factors as $(u + 1)(5u + 2) = 0,$ so $u = -1$ or $u = -\frac{2}{5}.$  This leads to the possible values $\boxed{0,-3}$ for $k.$